import java.util.Scanner;

public class java_7_29 {
    public static void main(String[] args) {
        int a = 0;
        int b = 1;
        Max(a, b);
        double x = 0;
        double y = 2;
        double z = 1;
        Max(x, y, z);
    }

    public static void Max(double x, double y, double z) {
        double ret = x > y ? x : y;
        System.out.println(ret > z ? ret : z);

    }

    private static void Max(int a, int b) {
        System.out.println(a > b ? a : b);
    }

    public static void main8(String[] args) {
        int a = 1;
        int b = 3;
        double x = 1;
        double y = 2;
        double z = 3;
        sum(a, b);
        sum(x, y, z);
    }

    public static void sum(int a, int b) {
        System.out.println(a + b);
    }

    public static void sum(double x, double y, double z) {
        System.out.println(x + y + z);
    }


    //求斐波那契数列的第n项。(迭代实现)
    public static void main7(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();
        int a = 1;
        int b = 1;
        int sum = 0;
        if (num == 1 || num == 2)
            System.out.println(1);
        else {
            for (int x = 1; x <= num - 2; x++) {
                sum = a + b;
                a = b;
                b = sum;
            }
            System.out.println(sum);
        }
    }


    //求阶乘和
    //
    //作业内容
    //求1！+2！+3！+4！+........+n!的和
    public static void main6(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int mul = 0;
        int sum = 0;
        for (int i = 1; i <= a; i++) {
            mul = 1;
            for (int j = 1; j <= i; j++) {
                mul *= j;
            }
            sum += mul;
        }
        System.out.println(sum);
    }

    public static void main5(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int mul = 1;
        for (int i = 1; i <= a; i++) {
            mul *= i;
        }
        System.out.println(mul);
    }

    //    使用函数求最大值
//
//            作业内容
//    创建方法求两个数的最大值max2，随后再写一个求3个数的最大值的函数max3。
//
//             要求：在max3这个函数中，调用max2函数，来实现3个数的最大值计算
    public static void main4(String[] args) {
        int a = 0;
        int b = 1;
        int c = 3;
        System.out.println(max3(a, b, c));
    }

    public static int max3(int a, int b, int c) {
        int one = max2(a, b);
        return max2(one, c);
    }

    public static int max2(int x, int y) {
        return x > y ? x : y;
    }

    //    求出0～n之间的所有“水仙花数”并输出。
//    (“水仙花数”是指一个三位数，其各位数字的立方和确好等于该数本 身，如；153＝1^3＋5^3＋3^3，则153是一个“水仙花数“。）
    public static void main2(String[] args) {

        for (int i = 1; i <= 999999; i++) {
            int count = 0;
            int tmp = i;
            int sum = 0;
            while (tmp != 0) {
                tmp /= 10;
                count++;
            }
            //count里面就存储了当前数字i是几位数
            tmp = i;
            while (tmp != 0) {
                sum += Math.pow(tmp % 10, count);
                tmp /= 10;
            }
            //sum就存储了和
            if (sum == i) {
                System.out.println(i);
            }
        }

    }

    //小实验
    public static void main3(String[] args) {
        byte n = 127;

        for (int i = 0; i <= 7; i++) {
            System.out.print(((n << i) & 128) + " ");
        }//偶数
//        System.out.println();
//
//        for (int i = 30; i >= 0; i -= 2) {
//            System.out.print(((n >> i) & 1) + " ");
//        }
    }

    //    获取一个数二进制序列中所有的偶数位和奇数位， 分别输出二进制序列
    public static void main1(String[] args) {
        int n = 8;
        System.out.print("偶数序列：");
        for (int i = 31; i >= 0; i -= 2) {
            System.out.print(((n >> i) & 1) + " ");
        }//偶数
        System.out.println();
        System.out.print("奇数序列：");
        for (int i = 30; i >= 0; i -= 2) {
            System.out.print(((n >> i) & 1) + " ");
        }
    }
}
